package com.alibaba.algo.components.permission.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.alibaba.algo.components.permission.domain.AppInfoDomain;
import com.alibaba.algo.components.permission.entity.AppInfo;
import com.alibaba.algo.components.permission.service.AppInfoService;

import lombok.extern.slf4j.Slf4j;

/**
 * @Description: appinfo
 * @author: malin
 * @date: 2020-12-15 15:17:09
 */
@Slf4j
@Service
public class AppInfoServiceImpl implements AppInfoService {
	@Autowired
	private AppInfoDomain appInfoDomain;

	@Override
	public String getAppSecret(long appId) {
		AppInfo appInfo = appInfoDomain.getById(appId);
		return appInfo == null ? null : appInfo.getAppSecret();
	}

}
